Liquid ejecting apparatus, computer system, and liquid ejecting method

ABSTRACT

A liquid ejecting apparatus etc. creating no blank space on a medium is achieved. The liquid ejecting apparatus has: a movable ejection head for ejecting a liquid; a feed mechanism for feeding a medium; and detecting means for detecting a position of an edge of the medium; wherein the apparatus repeats an operation of detecting the position of the edge with the detecting means, an operation of feeding the medium with the feed mechanism, and an operation of ejecting the liquid onto the medium from the moving ejection head; in accordance with the position of the edge that has been detected, the apparatus changes at least either one of a start position and an end position for ejecting the liquid from the moving ejection head; and if the position of the edge was not detected, the apparatus sets the start position or the end position to a position that has been established in advance.

TECHNICAL FIELD

The present invention relates to liquid ejecting apparatuses, computersystems, and liquid ejection methods.

BACKGROUND ART

Color inkjet printers, which are typical liquid ejecting apparatuses,are already well known. A color inkjet printer is provided with a printhead which serves as an example of an inkjet-type ejection head thatejects, from nozzles, ink which is an example of a liquid, and it isconfigured to record images, characters, and so forth by ejecting inkonto print paper, which serves as an example of a medium.

The print head is supported on a carriage in such a state that thenozzle surface in which the nozzles are formed is in opposition to theprint paper, and moves (performs main scan) along a guide member in thedirection of the width of the print paper and ejects ink insynchronization with the main scan.

In recent years, color inkjet printers that are capable of performingso-called borderless printing, in which printing is performed withrespect to the entire surface of the print paper, are gaining popularityfor such reasons as that it is possible to obtain output results thatlook like photographs. Through borderless printing, it is possible, forexample, to perform printing by ejecting ink without forming any blankspace even in the edges on the four sides of the print paper.

In borderless printing, in order to perform printing with respect to theentire surface of the print paper, it is important not to form any blankspace in the edges of the print paper that is printed on. To achievethis, it is advantageous to adopt a method of preparing print data whichis slightly larger than the print paper, that is, which includes acertain amount of margin with respect to the size of the print paper,and performing printing on the print paper in accordance with this printdata, taking into consideration situations in which the print paper issupplied in a slanted (skewed) manner.

Further, in order to eliminate the problem of the above-describedmethod, that is, the problem that ink is uselessly consumed byperforming printing on a region outside the print paper, it isadvantageous to adopt a method of detecting the position of the edge ofthe print paper with detecting means and changing the start positionand/or the end position for ejecting ink in accordance with the detectededge position.

However, in carrying out this method, situations may occur in which theposition of the edge of the print paper is not detected due to somereason. In such a situation, if the start position and/or the endposition for ejecting ink is determined simply by using informationabout the position of an edge that was previously detected, instead ofinformation about the position of the relevant edge, without changingthe way of determining the start position and/or the end position forejecting ink, then a problem that a blank space is unintentionallycreated on the print paper may arise. More specifically, the position ofthe edge that should have been detected and the position of an edge thatwas previously detected may significantly differ due to the print paperbeing supplied in a slanted (skewed) manner, and therefore, theabove-described problem may arise if the start position and/or the endposition is determined simply by using information about the position ofan edge that was previously detected without changing the way ofdetermining the start position and/or the end position for ejecting ink.

The present invention has been made in view of these issues, and anobject thereof is to achieve a liquid ejecting apparatus and a computersystem with which no blank space is created on a medium.

DISCLOSURE OF INVENTION

A main invention is a liquid ejecting apparatus comprising: a movableejection head for ejecting a liquid; a feed mechanism for feeding amedium; and detecting means for detecting a position of an edge of themedium; wherein the liquid ejecting apparatus repeats an operation ofdetecting the position of the edge with the detecting means, anoperation of feeding the medium with the feed mechanism, and anoperation of ejecting the liquid onto the medium from the ejection headthat is moving; wherein, in accordance with the position of the edgethat has been detected, the liquid ejecting apparatus changes at leasteither one of a start position and an end position for ejecting theliquid from the ejection head that is moving; and wherein, if theposition of the edge was not detected, the liquid ejecting apparatussets the start position or the end position to a position that has beenestablished in advance.

Other features of the present invention are made clear through thepresent specification and the description of the accompanying drawings.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram showing the configuration of a printing systemserving as an example of the present invention.

FIG. 2 is a schematic perspective view showing an example of the primarystructures of a color inkjet printer 20.

FIG. 3 is a schematic diagram for describing an example of a reflectiveoptical sensor 29.

FIG. 4 is a diagram showing the configuration of the periphery of acarriage 28 of the inkjet printer.

FIG. 5 is an explanatory diagram that schematically shows theconfiguration of a linear encoder 11 attached to the carriage 28.

FIG. 6 shows timing charts of the waveforms of the two output signals ofthe linear encoder 11 when the CR motor is rotating forward and when itis rotating in reverse.

FIG. 7 is a block diagram showing an example of the electricalconfiguration of the color inkjet printer 20.

FIG. 8 is an explanatory diagram showing the nozzle arrangement on thebottom surface of the print head 36.

FIG. 9 is a diagram schematically showing the positional relationshipamong the print head 36, the reflective optical sensor 29, and the printpaper P.

FIG. 10 is a flowchart for describing the first embodiment.

FIG. 11 is a explanatory diagram for describing the method of finding anink-ejection start position and an ink-ejection end position.

FIG. 12 is a flowchart for describing a second embodiment.

FIG. 13 is a flowchart for describing a third embodiment.

FIG. 14 is an explanatory diagram showing the external configuration ofthe computer system.

FIG. 15 is a block diagram showing the configuration of the computersystem shown in FIG. 14.

Legends of the main reference characters used in the drawings are shownbelow:

-   11 linear encoder-   12 linear encoder code plate-   13 rotary encoder-   14 rotary encoder code plate-   20 color inkjet printer-   21 CRT-   22 paper stacker-   24 paper feed roller-   25 pulley-   26 platen-   28 carriage-   29 reflective optical sensor-   30 carriage motor-   31 paper feed motor-   32 pull belt-   34 guide rails-   36 print head-   38 light-emitting section-   40 light-receiving section-   50 buffer memory-   52 image buffer-   54 system controller-   56 main memory-   58 EEPROM-   61 main-scan drive circuit-   62 sub-scan drive circuit-   63 head drive circuit-   65 reflective optical sensor control circuit-   66 electric signal measuring section-   90 computer-   91 video driver-   95 application program-   96 printer driver-   97 resolution conversion module-   98 color conversion module-   99 halftone module-   100 rasterizer-   101 user interface display module-   102 UI printer interface module-   1000 computer system-   1102 main computer unit-   1104 display device-   1106 printer-   1108 input device-   1108A keyboard-   1108B mouse-   1110 reading device-   1110A flexible disk drive device-   1110B CD-ROM drive device-   1202 internal memory-   1204 hard disk drive unit

BEST MODE FOR CARRYING OUT THE INVENTION

At least the following will be made clear through the presentspecification and the description of the accompanying drawings.

A liquid ejecting apparatus comprises: a movable ejection head forejecting a liquid; a feed mechanism for feeding a medium; and detectingmeans for detecting a position of an edge of the medium; wherein theliquid ejecting apparatus repeats an operation of detecting the positionof the edge with the detecting means, an operation of feeding the mediumwith the feed mechanism, and an operation of ejecting the liquid ontothe medium from the ejection head that is moving; wherein, in accordancewith the position of the edge that has been detected, the liquidejecting apparatus changes at least either one of a start position andan end position for ejecting the liquid from the ejection head that ismoving; and wherein, if the position of the edge was not detected, theliquid ejecting apparatus sets the start position or the end position toa position that has been established in advance.

It becomes possible to prevent a blank space from unintentionally beingcreated on the medium by setting the start position or the end positionto a position that has been established in advance in a case where theposition of the edge was not detected.

Further, a liquid ejecting apparatus comprises: a movable ejection headfor ejecting a liquid; a feed mechanism for feeding a medium; anddetecting means for detecting a position of an edge of the medium;wherein the liquid ejecting apparatus repeats an operation of detectingthe position of the edge with the detecting means, an operation offeeding the medium with the feed mechanism, and an operation of ejectingthe liquid onto the medium from the ejection head that is moving;wherein, in accordance with the position of the edge that has beendetected, the liquid ejecting apparatus changes at least either one of astart position and an end position for ejecting the liquid from theejection head that is moving; and wherein, if the position of the edgewas not detected, the liquid ejecting apparatus determines the startposition or the end position based on a position of the edge that wasdetected in the past.

It becomes possible to prevent a blank space from unintentionally beingcreated on the medium by determining the start position or the endposition based on a position of the edge that was detected in the pastin a case where the position of the edge was not detected.

Further, if the position of the edge was not detected, the startposition or the end position may be determined based on a plurality ofpositions of the edge that were detected in the past.

In this way, it is possible to determine an appropriate start positionor end position more accurately.

Further, if the position of the edge was not detected, the position ofthe edge that was not detected may be obtained from the plurality ofpositions of the edge that were detected in the past, and the startposition or the end position may be determined based on the position ofthe edge that has been obtained.

In this way, it is possible to determine the start position or the endposition more easily.

Further, if the position of the edge was not detected, the position ofthe edge that was not detected may be obtained from two positions of theedge that were detected in the past, and the start position or the endposition may be determined based on the position of the edge that hasbeen obtained.

In this way, it is possible to determine the start position or the endposition from minimum information regarding the positions of the edgethat were detected in the past.

Further, if the position of the edge was not detected, the position ofthe edge that was not detected may be obtained from the plurality ofpositions of the edge that were detected in the past and a feed amountby which the medium was fed from when the positions of the edge weredetected, and the start position or the end position may be determinedbased on the position of the edge that has been obtained.

In this way, it is possible to determine an appropriate start positionor end position more accurately.

Further, if the position of the edge was not detected, the startposition or the end position may be determined based on a singleposition of the edge that was detected in the past and a predictedmaximum skew angle of the medium.

In this way, it is possible to determine the start position or the endposition from minimum information regarding the position of the edgethat was detected in the past.

Further, if the position of the edge was not detected, the position ofthe edge that was not detected may be obtained from the single positionof the edge that was detected in the past and the predicted maximum skewangle of the medium, and the start position or the end position may bedetermined based on the position of the edge that has been obtained.

In this way, it is possible to determine the start position or the endposition more easily.

Further, if the position of the edge was not detected, the position ofthe edge that was not detected may be obtained from the single positionof the edge that was detected in the past, a feed amount by which themedium was fed from when the position of the edge was detected, and thepredicted maximum skew angle of the medium, and the start position orthe end position may be determined based on the position of the edgethat has been obtained.

In this way, it is possible to determine an appropriate start positionor end position more accurately.

Further, a liquid ejecting apparatus comprises: a movable ejection headfor ejecting a liquid; a feed mechanism for feeding a medium; anddetecting means for detecting positions of both edges of the medium;wherein the liquid ejecting apparatus repeats an operation of detectingthe positions of both edges with the detecting means, an operation offeeding the medium with the feed mechanism, and an operation of ejectingthe liquid onto the medium from the ejection head that is moving;wherein, in accordance with at least either one of the positions of bothedges that have been detected, the liquid ejecting apparatus changes atleast either one of a start position and an end position for ejectingthe liquid from the ejection head that is moving; and wherein, if aposition of one edge, of among the positions of both edges, was notdetected, the liquid ejecting apparatus determines the start position orthe end position based on a position of the other edge, of among thepositions of both edges.

It becomes possible to prevent a blank space from unintentionally beingcreated on the medium by determining the start position or the endposition based on the position of the other edge, of among the positionsof both edges, in a case where the position of one edge, of among thepositions of both edges, was not detected.

Further, if the position of one edge, of among the positions of bothedges, was not detected, the position of the one edge that was notdetected may be obtained from the position of the other edge, of amongthe positions of both edges, and the start position or the end positionmay be determined based on the position of the one edge that has beenobtained.

In this way, it is possible to determine the start position or the endposition more easily.

Further, if the position of one edge, of among the positions of bothedges, was not detected, the position of the one edge that was notdetected may be obtained from the position of the other edge, of amongthe positions of both edges, and a width of the medium, and the startposition or the end position may be determined based on the position ofthe one edge that has been obtained.

In this way, it is possible to determine an appropriate start positionor end position more accurately.

Further, the liquid may be ejected with respect to the entire surface ofthe medium.

The advantages of the above-described means become more significant whenthe liquid is ejected with respect to the entire surface of the medium,because the liquid is ejected also onto the edges of the medium.

Further, the detecting means may include light-emitting means foremitting light, and a light-receiving sensor for receiving the lightthat moves in a main-scanning direction in accordance with the movementof the light-emitting means in the main-scanning direction; and theposition of the edge may be detected based on a change in an outputvalue of the light-receiving sensor caused by the light emitted from thelight-emitting means that moves in the main-scanning direction passingacross the edge.

In this way, it is possible to detect the position of the edge moreeasily.

Further, positions of two edges that differ in position in themain-scanning direction may be detected based on the change in theoutput value of the light-receiving sensor caused by the light emittedfrom the light-emitting means that moves in the main-scanning directionpassing across the edges; and the start position may be changed inaccordance with one of the positions of the two edges that weredetected, and the end position may be changed in accordance with theother of the positions of the two edges that were detected.

In this way, the above-described effect, that is, the effect of beingable to prevent a blank space from unintentionally being created on themedium, will be achieved more significantly.

Further, the detecting means may be provided on a movable moving memberprovided with the ejection head.

In this way, it is possible to share the mechanism for moving the movingmember and the detecting means.

Further, while the moving member is moved in a main-scanning direction,the position of the edge may be detected based on a change in an outputvalue of the light-receiving sensor caused by the light emitted from thelight-emitting means that moves in the main-scanning direction passingacross the edge, and the liquid may be ejected from the ejection headonto the medium.

In this way, it is possible to achieve efficient operation of the liquidejecting apparatus.

Further, the liquid may be ink; and the liquid ejecting apparatus may bea printing apparatus that performs printing on a medium to be printed,which serves as the medium, by ejecting the ink from the ejection head.

In this case, it is possible to achieve a printing apparatus that takesthe effects described above.

It is also possible to achieve a liquid ejecting apparatus comprising: amovable ejection head for ejecting a liquid; a feed mechanism forfeeding a medium; and detecting means for detecting a position of anedge of the medium; wherein the liquid ejecting apparatus repeats anoperation of detecting the position of the edge with the detectingmeans, an operation of feeding the medium with the feed mechanism, andan operation of ejecting the liquid with respect to an entire surface ofthe medium from the ejection head that is moving; wherein, in accordancewith the position of the edge that has been detected, the liquidejecting apparatus changes at least either one of a start position andan end position for ejecting the liquid from the ejection head that ismoving; wherein, if the position of the edge was not detected, theliquid ejecting apparatus sets the start position or the end position toa position that has been established in advance; wherein the detectingmeans includes light-emitting means for emitting light, and alight-receiving sensor for receiving the light that moves in amain-scanning direction in accordance with the movement of thelight-emitting means in the main-scanning direction; wherein positionsof two edges that differ in position in the main-scanning direction aredetected based on a change in an output value of the light-receivingsensor caused by the light emitted from the light-emitting means thatmoves in the main-scanning direction passing across the edges; whereinthe start position is changed in accordance with one of the positions ofthe two edges that were detected, and the end position is changed inaccordance with the other of the positions of the two edges that weredetected; wherein the detecting means is provided on a movable movingmember provided with the ejection head; wherein, while the moving memberis moved in the main-scanning direction, the position of the edge isdetected based on the change in the output value of the light-receivingsensor caused by the light emitted from the light-emitting means thatmoves in the main-scanning direction passing across the edge, and theliquid is ejected from the ejection head onto the medium; wherein theliquid is ink; and wherein the liquid ejecting apparatus is a printingapparatus that performs printing on a medium to be printed, which servesas the medium, by ejecting the ink from the ejection head.

It is also possible to achieve a liquid ejecting apparatus comprising: amovable ejection head for ejecting a liquid; a feed mechanism forfeeding a medium; and detecting means for detecting a position of anedge of the medium; wherein the liquid ejecting apparatus repeats anoperation of detecting the position of the edge with the detectingmeans, an operation of feeding the medium with the feed mechanism, andan operation of ejecting the liquid with respect to an entire surface ofthe medium from the ejection head that is moving; wherein, in accordancewith the position of the edge that has been detected, the liquidejecting apparatus changes at least either one of a start position andan end position for ejecting the liquid from the ejection head that ismoving; wherein, if the position of the edge was not detected, theliquid ejecting apparatus obtains the position of the edge that was notdetected from two positions of the edge that were detected in the pastand a feed amount by which the medium was fed from when the positions ofthe edge were detected, and determines the start position or the endposition based on the position of the edge that has been obtained;wherein the detecting means includes light-emitting means for emittinglight, and a light-receiving sensor for receiving the light that movesin a main-scanning direction in accordance with the movement of thelight-emitting means in the main-scanning direction; wherein positionsof two edges that differ in position in the main-scanning direction aredetected based on a change in an output value of the light-receivingsensor caused by the light emitted from the light-emitting means thatmoves in the main-scanning direction passing across the edges; whereinthe start position is changed in accordance with one of the positions ofthe two edges that were detected, and the end position is changed inaccordance with the other of the positions of the two edges that weredetected; wherein the detecting means is provided on a movable movingmember provided with the ejection head; wherein, while the moving memberis moved in the main-scanning direction, the position of the edge isdetected based on the change in the output value of the light-receivingsensor caused by the light emitted from the light-emitting means thatmoves in the main-scanning direction passing across the edge, and theliquid is ejected from the ejection head onto the medium; wherein theliquid is ink; and wherein the liquid ejecting apparatus is a printingapparatus that performs printing on a medium to be printed, which servesas the medium, by ejecting the ink from the ejection head.

It is also possible to achieve a liquid ejecting apparatus comprising: amovable ejection head for ejecting a liquid; a feed mechanism forfeeding a medium; and detecting means for detecting a position of anedge of the medium; wherein the liquid ejecting apparatus repeats anoperation of detecting the position of the edge with the detectingmeans, an operation of feeding the medium with the feed mechanism, andan operation of ejecting the liquid with respect to an entire surface ofthe medium from the ejection head that is moving; wherein, in accordancewith the position of the edge that has been detected, the liquidejecting apparatus changes at least either one of a start position andan end position for ejecting the liquid from the ejection head that ismoving; wherein, if the position of the edge was not detected, theliquid ejecting apparatus obtains the position of the edge that was notdetected from a single position of the edge that was detected in thepast, a feed amount by which the medium was fed from when the positionof the edge was detected, and a predicted maximum skew angle of themedium, and determines the start position or the end position based onthe position of the edge that has been obtained; wherein the detectingmeans includes light-emitting means for emitting light, and alight-receiving sensor for receiving the light that moves in amain-scanning direction in accordance with the movement of thelight-emitting means in the main-scanning direction; wherein positionsof two edges that differ in position in the main-scanning direction aredetected based on a change in an output value of the light-receivingsensor caused by the light emitted from the light-emitting means thatmoves in the main-scanning direction passing across the edges; whereinthe start position is changed in accordance with one of the positions ofthe two edges that were detected, and the end position is changed inaccordance with the other of the positions of the two edges that weredetected; wherein the detecting means is provided on a movable movingmember provided with the ejection head; wherein, while the moving memberis moved in the main-scanning direction, the position of the edge isdetected based on the change in the output value of the light-receivingsensor caused by the light emitted from the light-emitting means thatmoves in the main-scanning direction passing across the edge, and theliquid is ejected from the ejection head onto the medium; wherein theliquid is ink; and wherein the liquid ejecting apparatus is a printingapparatus that performs printing on a medium to be printed, which servesas the medium, by ejecting the ink from the ejection head.

It is also possible to achieve a liquid ejecting apparatus comprising: amovable ejection head for ejecting a liquid; a feed mechanism forfeeding a medium; and detecting means for detecting positions of bothedges of the medium; wherein the liquid ejecting apparatus repeats anoperation of detecting the positions of both edges with the detectingmeans, an operation of feeding the medium with the feed mechanism, andan operation of ejecting the liquid with respect to an entire surface ofthe medium from the ejection head that is moving; wherein, in accordancewith at least either one of the positions of both edges that have beendetected, the liquid ejecting apparatus changes at least either one of astart position and an end position for ejecting the liquid from theejection head that is moving; wherein, if a position of one edge, ofamong the positions of both edges, was not detected, the liquid ejectingapparatus obtains the position of the one edge that was not detectedfrom the position of the other edge, of among the positions of bothedges, and a width of the medium, and determines the start position orthe end position based on the position of the one edge that has beenobtained; wherein the detecting means includes light-emitting means foremitting light, and a light-receiving sensor for receiving the lightthat moves in a main-scanning direction in accordance with the movementof the light-emitting means in the main-scanning direction; whereinpositions of two edges that differ in position in the main-scanningdirection are detected based on a change in an output value of thelight-receiving sensor caused by the light emitted from thelight-emitting means that moves in the main-scanning direction passingacross the edges; wherein the start position is changed in accordancewith one of the positions of the two edges that were detected, and theend position is changed in accordance with the other of the positions ofthe two edges that were detected; wherein the detecting means isprovided on a movable moving member provided with the ejection head;wherein, while the moving member is moved in the main-scanningdirection, the position of the edge is detected based on the change inthe output value of the light-receiving sensor caused by the lightemitted from the light-emitting means that moves in the main-scanningdirection passing across the edge, and the liquid is ejected from theejection head onto the medium; wherein the liquid is ink; and whereinthe liquid ejecting apparatus is a printing apparatus that performsprinting on a medium to be printed, which serves as the medium, byejecting the ink from the ejection head.

It is also possible to achieve a computer system comprising: a maincomputer unit; a display device that is connectable to the main computerunit; and a liquid ejecting apparatus that is connectable to the maincomputer unit and that is provided with: a movable ejection head forejecting a liquid; a feed mechanism for feeding a medium; and detectingmeans for detecting a position of an edge of the medium; wherein theliquid ejecting apparatus repeats an operation of detecting the positionof the edge with the detecting means, an operation of feeding the mediumwith the feed mechanism, and an operation of ejecting the liquid ontothe medium from the ejection head that is moving; wherein, in accordancewith the position of the edge that has been detected, the liquidejecting apparatus changes at least either one of a start position andan end position for ejecting the liquid from the ejection head that ismoving; and wherein, if the position of the edge was not detected, theliquid ejecting apparatus sets the start position or the end position toa position that has been established in advance.

It is also possible to achieve a computer system comprising: a maincomputer unit; a display device that is connectable to the main computerunit; and a liquid ejecting apparatus that is connectable to the maincomputer unit and that is provided with: a movable ejection head forejecting a liquid; a feed mechanism for feeding a medium; and detectingmeans for detecting a position of an edge of the medium; wherein theliquid ejecting apparatus repeats an operation of detecting the positionof the edge with the detecting means, an operation of feeding the mediumwith the feed mechanism, and an operation of ejecting the liquid ontothe medium from the ejection head that is moving; wherein, in accordancewith the position of the edge that has been detected, the liquidejecting apparatus changes at least either one of a start position andan end position for ejecting the liquid from the ejection head that ismoving; and wherein, if the position of the edge was not detected, theliquid ejecting apparatus determines the start position or the endposition based on a position of the edge that was detected in the past.

It is also possible to achieve a computer system comprising: a maincomputer unit; a display device that is connectable to the main computerunit; and a liquid ejecting apparatus that is connectable to the maincomputer unit and that is provided with: a movable ejection head forejecting a liquid; a feed mechanism for feeding a medium; and detectingmeans for detecting positions of both edges of the medium; wherein theliquid ejecting apparatus repeats an operation of detecting thepositions of both edges with the detecting means, an operation offeeding the medium with the feed mechanism, and an operation of ejectingthe liquid onto the medium from the ejection head that is moving;wherein, in accordance with at least either one of the positions of bothedges that have been detected, the liquid ejecting apparatus changes atleast either one of a start position and an end position for ejectingthe liquid from the ejection head that is moving; and wherein, if aposition of one edge, of among the positions of both edges, was notdetected, the liquid ejecting apparatus determines the start position orthe end position based on a position of the other edge, of among thepositions of both edges.

Computer systems achieved as above become superior to conventionalsystems as a whole.

It is also possible to achieve a liquid ejection method of ejecting aliquid onto a medium, comprising: a step of detecting a position of anedge of the medium with a sensor; a step of feeding the medium; and astep of changing, in accordance with the position of the edge that hasbeen detected, at least either one of a start position and an endposition for ejecting the liquid from an ejection head that is moving;wherein, if the position of the edge was not detected, the startposition or the end position is set to a position that has beenestablished in advance.

It is also possible to achieve a liquid ejection method of ejecting aliquid onto a medium, comprising: a step of detecting a position of anedge of the medium with a sensor; a step of feeding the medium; and astep of changing, in accordance with the position of the edge that hasbeen detected, at least either one of a start position and an endposition for ejecting the liquid from an ejection head that is moving;wherein, if the position of the edge was not detected, the startposition or the end position is determined based on a position of theedge that was detected in the past.

It is also possible to achieve a liquid ejection method of ejecting aliquid onto a medium, comprising: a step of detecting a position of anedge of the medium with a sensor; a step of feeding the medium; and astep of changing, in accordance with the position of the edge that hasbeen detected, at least either one of a start position and an endposition for ejecting the liquid from an ejection head that is moving;wherein, if a position of one edge, of among the positions of bothedges, was not detected, the start position or the end position isdetermined based on a position of the other edge, of among the positionsof both edges.

===Example of the Overall Configuration of the Apparatus===

FIG. 1 is a block diagram showing the configuration of a printing systemserving as an example of the present invention. The printing system isprovided with a computer 90 and a color inkjet printer 20, which is anexample of a liquid ejecting apparatus. It should be noted that theprinting system including the color inkjet printer 20 and the computer90 can also be broadly referred to as a “liquid ejecting apparatus.”Although not shown in the diagram, a computer system is made of thecomputer 90, the color inkjet printer 20, a display device such as a CRT21 or a liquid crystal display device, input devices such as a keyboardand a mouse, and a drive device such as a flexible drive device or aCD-ROM drive device.

In the computer 90, an application program 95 is executed under apredetermined operating system. The operating system includes a videodriver 91 and a printer driver 96, and the application program 95outputs print data PD to be transferred to the color inkjet printer 20through these drivers. The application program 95, which carries outretouching of images, for example, carries out a desired process withrespect to an image to be processed, and also displays the image on theCRT 21 via the video driver 91.

When the application program 95 issues a print command, the printerdriver 96 of the computer 90 receives image data from the applicationprogram 95 and converts these into print data PD to be supplied to thecolor inkjet printer 20. The printer driver 96 is internally providedwith a resolution conversion module 97, a color conversion module 98, ahalftone module 99, a rasterizer 100, a user interface display module101, a UI printer interface module 102, and a color conversion look-uptable LUT.

The resolution conversion module 97 performs the function of convertingthe resolution of the color image data formed by the application program95 to a print resolution. The image data whose resolution is thusconverted is image information still made of the three color componentsRGB. The color conversion module 98 refers to the color conversionlook-up table LUT and, for each pixel, converts the RGB image data intomulti-gradation data of a plurality of ink colors that can be used bythe color inkjet printer 20.

The multi-gradation data that have been color converted have a gradationvalue of 256 grades, for example. The halftone module 99 executesso-called halftone processing to create halftone image data. Thehalftone image data are arranged by the rasterizer 100 into the order inwhich they are to be transferred to the color inkjet printer 20, and areoutput as the final print data PD. The print data PD include raster dataindicating the state in which dots are formed during each main scan, anddata indicating the sub-scan feed amount.

The user interface display module 101 has a function of displayingvarious types of user interface windows related to printing and afunction of receiving input from the user in these windows.

The UI printer interface module 102 functions as an interface betweenthe user interface (UI) and the color inkjet printer. It interpretsinstructions given by users through the user interface and sends variouscommands COM to the color inkjet printer. Conversely, it also interpretscommands COM received from the color inkjet printer and executes variousdisplays with respect to the user interface.

It should be noted that the printer driver 96 achieves, for example, afunction of sending and receiving various types of commands COM and afunction of supplying print data PD to the color inkjet printer 20. Aprogram for realizing the functions of the printer driver 96 is suppliedin a format in which it is stored on a computer-readable storage medium.Examples of this storage medium include various types ofcomputer-readable media, such as flexible disks, CD-ROMS, magnetooptical disks, IC cards, ROM cartridges, punch cards, printed materialson which a code such as a bar code is printed, internal storage devices(memory such as a RAM or a ROM) and external storage devices of thecomputer. The computer program can also be downloaded onto the computer90 via the Internet.

FIG. 2 is a schematic perspective view showing an example of the primarystructures of the color inkjet printer 20. The color inkjet printer 20is provided with a paper stacker 22, a paper feed roller 24 driven by astep motor that is not shown, a platen 26, a carriage 28 serving as anexample of a moving member that is movable and that is provided with aprint head for forming dots, a carriage motor 30, a pull belt 32 that isdriven by the carriage motor 30, and guide rails 34 for the carriage 28.Further, a print head 36, which is an example of an ejection headprovided with numerous nozzles, and a reflective optical sensor 29,which serves as an example of detecting means (sensor) described indetail later, are mounted onto the carriage 28.

The print paper P is rolled from the paper stacker 22 by the paper feedroller 24 and fed in a paper-feed direction (hereinafter also referredto as the sub-scanning direction) over the surface of the platen 26. Thecarriage 28 is pulled by the pull belt 32, which is driven by thecarriage motor 30, and moves in the main-scanning direction along theguide rails 34. It should be noted that as shown in the diagram, themain-scanning direction refers to the two directions perpendicular tothe sub-scanning direction. The paper feed roller 24 is also used tocarry out the paper supply operation for supplying the print paper P tothe color inkjet printer 20 and the paper discharge operation fordischarging the print paper P from the color inkjet printer 20.

===Example of Configuration of the Reflective Optical Sensor===

FIG. 3 is a schematic diagram for describing an example of thereflective optical sensor 29. The reflective optical sensor 29 isattached to the carriage 28, and has a light-emitting section 38, whichis for example made of a light emitting diode and is an example of alight-emitting means, and a light-receiving section 40, which is forexample made of a phototransistor and is an example of a light-receivingsensor. The light that is emitted from the light-emitting section 38,that is, the incident light, is reflected by print paper P or by theplaten 26 if there is no print paper P in the direction in which theemitted light travels. The light that is reflected is received by thelight-receiving section 40 and is converted into an electric signal.Then, the magnitude of the electric signal is measured as the outputvalue of the light-receiving sensor corresponding to the intensity ofthe reflected light that is received.

It should be noted that in the above description, as shown in thefigure, the light-emitting section 38 and the light-receiving section 40are provided as a single unit and together constitute the reflectiveoptical sensor 29. However, they may also constitute separate devices,such as a light emitting device and a light-receiving device.

Further, in the above description, the reflected light was convertedinto an electric signal and then the magnitude of that electric signalwas measured in order to obtain the intensity of the reflected lightthat is received. However, this is not a limitation, and it is onlynecessary that the output value of the light-receiving sensorcorresponding to the intensity of the reflected light that is receivedcan be measured.

===Example of Configuration of the Periphery of the Carriage===

The configuration of the carriage area is described next. FIG. 4 is adiagram showing the configuration of the periphery of the carriage 28 ofthe inkjet printer.

The inkjet printer shown in FIG. 4 is provided with a paper feed motor(hereinafter referred to as PF motor) 31, which is as an example of thefeed mechanism for feeding paper, the carriage 28 to which the printhead 36 for ejecting ink, which is an example of a liquid, onto theprint paper P is fastened and which is driven in the main-scanningdirection, the carriage motor (hereinafter referred to as CR motor) 30for driving the carriage 28, a linear encoder 11 that is fastened to thecarriage 28, a linear encoder code plate 12 in which slits are formed ata predetermined spacing, a rotary encoder 13, which is not shown, forthe PF motor 31, the platen 26 for supporting the print paper P, thepaper feed roller 24 driven by the PF motor 31 for carrying the printpaper P, a pulley 25 attached to the rotational shaft of the CR motor30, and the pull belt 32 driven by the pulley 25.

Next, the above-described linear encoder 11 and the rotary encoder 13are described. FIG. 5 is an explanatory diagram that schematically showsthe configuration of the linear encoder 11 attached to the carriage 28.

The linear encoder 11 shown in FIG. 5 is provided with a light emittingdiode 11 a, a collimating lens 11 b, and a detection processing section11 c. The detection processing section 11 c has a plurality of (forexample, four) photodiodes 11 d, a signal processing circuit 11 e, andfor example two comparators 11 fA and 11 fB.

The light-emitting diode 11 a emits light when a voltage Vcc is appliedto it via resistors on both ends thereof. This light is condensed intoparallel light by the collimating lens 11 b and passes through thelinear encoder code plate 12. The linear encoder code plate 12 isprovided with slits at a predetermined spacing (for example, 1/180 inch(one inch=2.54 cm)).

The parallel light that passes through the linear encoder code plate 12then passes through stationary slits which are not shown and is incidenton the photodiodes 11 d, where it is converted into electric signals.The electric signals that are output from the four photodiodes 11 d aresubjected to signal processing by the signal processing circuit 11 e,the signals that are output from the signal processing circuit 11 e arecompared in the comparators 11 fA and 11 fB, and the results of thesecomparisons are output as pulses. Then, the pulse ENC-A and the pulseENC-B that are output from the comparators 11 fA and 11 fB become theoutput of the linear encoder 11.

FIG. 6 shows timing charts of the waveforms of the two output signals ofthe linear encoder 11 for when the CR motor is rotating forward and whenit is rotating in reverse.

As shown in FIG. 6( a) and FIG. 6( b), the phases of the pulse ENC-A andthe pulse ENC-B are misaligned by 90 degrees both when the CR motor isrotating forward and when it is rotating in reverse. When the CR motor30 is rotating forward, that is, when the carriage 28 is moving in themain-scanning direction, then, as shown in FIG. 6( a), the phase of thepulse ENC-A leads the phase of the pulse ENC-B by 90 degrees, whereaswhen the CR motor 30 is rotating in reverse, then, as shown in FIG. 6(b), the phase of the pulse ENC-A is delayed by 90 degrees with respectto the phase of the pulse ENC-B. A single period T of the pulse ENC-Aand the pulse ENC-B is equivalent to the time during which the carriage28 is moved by the slit spacing of the linear encoder code plate 12.

The rising edge and the rising edge of the output pulses ENC-A and ENC-Bof the linear encoder 11 are detected, and the number of detected edgesis counted. The rotational position of the CR motor 30 is detected basedon the number that is calculated. With respect to the calculation, whenthe CR motor 30 is rotating forward a “+1” is added for each detectededge, and when the CR motor 30 is rotating in reverse a “−1” is addedfor each detected edge. The period of the pulses ENC-A and ENC-B isequal to the time from when one slit of the linear encoder code plate 12passes through the linear encoder 11 to when the next slit passesthrough the linear encoder 11, and the phases of the pulse ENC-A and thepulse ENC-B are misaligned by 90 degrees. Accordingly, a count number of“1” of the calculation corresponds to ¼ of the slit spacing of thelinear encoder code plate 12. Therefore, if the counted number ismultiplied by ¼ of the slit spacing, then the amount that the CR motor30 has moved from the rotational position corresponding to the countnumber “0” can be obtained based on this product. The resolution of thelinear encoder 11 at this time is ¼ the slit spacing of the linearencoder code plate 12.

On the other hand, the rotary encoder 13 for the PF motor 31 has thesame configuration as the linear encoder 11, except that the rotaryencoder code plate 14 is a rotation disk that rotates in conjunctionwith rotation of the PF motor 31. The rotary encoder 13 outputs twooutput pulses ENC-A and ENC-B, and based on this output the amount ofmovement of the PF motor 31 can be obtained.

===Example of the Electric Configuration of the Color Inkjet Printer===

FIG. 7 is a block diagram showing an example of the electricconfiguration of the color inkjet printer 20. The color inkjet printer20 is provided with a buffer memory 50 for receiving signals suppliedfrom the computer 90, an image buffer 52 for storing print data, asystem controller 54 for controlling the overall operation of the colorinkjet printer 20, a main memory 56, and an EEPROM 58. The systemcontroller 54 is connected to a main-scan drive circuit 61 for drivingthe carriage motor 30, a sub-scan drive circuit 62 for driving the paperfeed motor 31, a head drive circuit 63 for driving the print head 36, areflective optical sensor control circuit 65 for controlling thelight-emitting section 38 and the light-receiving section 40 of thereflective optical sensor 29, the above-described linear encoder 11, andthe above-described rotary encoder 13. Further, the reflective opticalsensor control circuit 65 is provided with an electric signal measuringsection 66 for measuring the electric signals that are converted fromthe reflected light received by the light-receiving section 40.

The print data that are transferred from the computer 90 are heldtemporarily in the buffer memory 50. Within the color inkjet printer 20,the system controller 54 reads necessary information from the print datain the buffer memory 50, and based on this information, sends controlsignals to the main-scan drive circuit 61, the sub-scan drive circuit62, and the head drive circuit 63, for example.

The image buffer 52 stores print data for a plurality of colorcomponents that are received by the buffer memory 50. The head drivecircuit 63 reads the print data of the various color components from theimage buffer 52 in accordance with the control signals from the systemcontroller 54, and drives the nozzle arrays of the respective colorsprovided in the print head 36 in correspondence with the print data.

===Example of Nozzle Arrangement of Print Head, etc.===

FIG. 8 is an explanatory diagram showing the nozzle arrangement on thebottom surface of the print head 36. The print head 36 has a blacknozzle row, a yellow nozzle row, a magenta nozzle row, and a cyan nozzlerow, arranged in straight lines in the sub-scanning direction. As shownin the diagram, each of these nozzle rows is constituted by two rows,and in this specification, these nozzle rows are referred to as thefirst black nozzle row, the second black nozzle row, the first yellownozzle row, the second yellow nozzle row, the first magenta nozzle row,the second magenta nozzle row, the first cyan nozzle row, and the secondcyan nozzle row.

The black nozzle rows (shown by white circles) have 360 nozzles, nozzles#1 to #360. Of these nozzles, the odd-numbered nozzles #1, #3, . . . ,#359 belong to the first black nozzle row and the even-numbered nozzles#2, #4, . . . , #360 belong to the second black nozzle row. The nozzles#1, #3, . . . , #359 of the first black nozzle row are arranged at aconstant nozzle pitch k·D in the sub-scanning direction. Here, D is thedot pitch in the sub-scanning direction, and k is an integer. The dotpitch D in the sub-scanning direction is equal to the pitch of the mainscan lines (raster lines). Hereafter, the integer k for expressing thenozzle pitch k·D is referred to simply as the “nozzle pitch k.” In theexample of FIG. 8, the nozzle pitch k is four dots. The nozzle pitch k,however, may be set to any integer.

The nozzles #2, #4, . . . , #360 of the second black nozzle row are alsoarranged at the constant nozzle pitch k·D (nozzle pitch k=4) in thesub-scanning direction, and as shown in the diagram, the positions ofthe nozzles in the sub-scanning direction are misaligned with thepositions of the nozzles of the first black nozzle row in thesub-scanning direction. In the example of FIG. 8, the amount of thismisalignment is ½·k·D (k=4).

The above-described matters also apply for the yellow nozzle rows (shownby white triangles), the magenta nozzle rows (shown by white squares),and the cyan nozzle rows (shown by white diamonds). In other words, eachof the these nozzle rows has 360 nozzles #1 to #360, and of the thesenozzles, the odd-numbered nozzles #1, #3, . . . , #359 belong to thefirst nozzle row and the even-numbered nozzles #2, #4, . . . , #360belong to the second nozzle row. Further, each of these nozzle rows isarranged at a constant nozzle pitch k·D in the sub-scanning direction,and the positions, in the sub-scanning direction, of the nozzles of thesecond rows are misaligned with respect to the positions, in thesub-scanning direction, of the nozzles of the first rows by ½·k·D (k=4).

In other words, the nozzle groups arranged in the print head 36 arestaggered, and during printing, ink droplets are ejected from each ofthe nozzles while the print head 36 is moved in the main-scanningdirection at a constant velocity together with the carriage 28. However,depending on the print mode, not all of the nozzles are always used, andthere are instances in which only some of the nozzles are used.

It should be noted that the reflective optical sensor 29 described aboveis attached to the carriage 28 along with the print head 36. As shown inthe figure, in the present embodiment, the position of the reflectiveoptical sensor 29 in the sub-scanning direction matches the position, inthe sub-scanning direction, of the nozzle #360 described above.

First Embodiment

Next, a first embodiment of the present invention is described usingFIG. 9 and FIG. 10. FIG. 9 is a diagram schematically showing thepositional relationship among the print head 36, the reflective opticalsensor 29, and the print paper P. FIG. 10 is a flowchart for describingthe first embodiment.

First, the user gives a command to perform printing through theapplication program 95 or the like (step S2). The application program 95receives this instruction and issues a print command. Accordingly, theprinter driver 96 of the computer 90 receives image data from theapplication program 95 and converts them to print data PD includingraster data indicating the state in which dots are formed during mainscan and data indicating the sub-scan feed amount. Moreover, the printerdriver 96 supplies the print data PD to the color inkjet printer 20together with various commands COM. The color inkjet printer 20 receivesthese at its buffer memory 50, after which it sends them to the imagebuffer 52 or the system controller 54.

The user can also designate the size of the print paper P or issue acommand to perform borderless printing to the user interface displaymodule 101. This instruction by the user is received by the userinterface display module 101 and sent to the UI printer interface module102. The UI printer interface module 102 interprets the instruction thathas been given, and sends a command COM to the color inkjet printer 20.The color inkjet printer 20 receives the command COM at the buffermemory 50 and then transmits it to the system controller 54.

The color inkjet printer 20 then drives, for example, the paper feedmotor 31 by the sub-scan drive circuit 62 based on the command that issent to the system controller 54 so as to supply the print paper P (stepS4).

Then, the system controller 54 moves the carriage 28 in themain-scanning direction as it feeds the print paper P in the paper-feeddirection, and ejects ink from the print head 36 provided in thecarriage 28, thereby carrying out borderless printing (step S6, stepS8). It should be noted that the print paper P is fed in the paper-feeddirection by driving the paper feed motor 31 with the sub-scan drivecircuit 62, the carriage 28 is moved in the main-scanning direction bydriving the carriage motor 30 with the main-scan drive circuit 61, andink is ejected from the print head 36 by driving the print head 36 withthe head drive circuit 63.

The color inkjet printer 20 carries out the operations of step S6 andstep S8 continuously, and if, for example, the number of times thecarriage 28 is moved in the main-scanning direction reaches apredetermined number of times (step S10), then, from the next move ofthe carriage 28 in the main-scanning direction, the following operationis performed.

The system controller 54 controls the reflective optical sensor 29,which is provided in the carriage 28, by the reflective optical sensorcontrol circuit 65, so that light is emitted toward the platen 26 fromthe light-emitting section 38 of the reflective optical sensor 29 (stepS12).

A counter (not shown) for counting the series of operations that arerepeated as described below is provided, and the system controller 54resets the counter (step S14). Resetting is achieved, for example, bysetting the counter value N to zero. Next, the system controller 54 addsone (1) to the counter value N (step S16), and as shown in FIG. 9( a)and FIG. 9( b), it makes the main-scan drive circuit 61 drive the CRmotor 30 to move the carriage 28, in order to eject ink from the printhead 36 provided in the carriage 28 and perform borderless printing(step S18). Eventually, as shown in FIG. 9( b), the light that isemitted from the light-emitting section 38 passes across the edge of theprint paper P (step S20). At this time, the object on which the lightthat is emitted from the light-emitting section 38 is incident changesfrom the platen 26 to the print paper P, and thus the intensity of theelectric signal, that is, the value output by the light-receivingsection 40 of the reflective optical sensor 29 that receives thereflected light, is changed. Then, by measuring the intensity of thiselectric signal with the electric signal measuring section 66, the factthat the light has passed the edge of the print paper P is detected.

Then, the amount of movement of the CR motor 30 from the referenceposition is obtained based on the output pulses of the linear encoder11, and this amount of movement, in other words, the position of thecarriage 28 (below, this position is referred to also as position A) isstored as the N-th data (step S22).

As shown in FIG. 9( b) and FIG. 9( c), also after the above-describedstep S16 and step S18, the system controller 54 moves the carriage 28and ejects the ink from the print head 36 provided in the carriage 28 toperform borderless printing (step S24).

Eventually, as shown in FIG. 9( c), the light that is emitted from thelight-emitting section 38 passes across the edge of the print paper P(which is an edge whose position in the main-scanning direction isdifferent from that of the edge passed in step S20) (step S26). At thistime, the object on which the light that is emitted from thelight-emitting section 38 is incident changes from the print paper P tothe platen 26, and thus the intensity of the electric signal, that is,the value output by the light-receiving section 40 of the reflectiveoptical sensor 29 that receives the light that is reflected, is changed.Then, by measuring the intensity of this electric signal with theelectric signal measuring section 66, the fact that the light has passedthe edge of the print paper P is detected.

Then, the amount of movement of the CR motor 30 from the referenceposition is obtained based on the output pulses of the linear encoder11, and this amount of movement, in other words, the position of thecarriage 28 (below, this position is referred to also as position B) isstored as the N-th data (step S28).

Next, as shown in FIG. 9( c) and FIG. 9( d), the system controller 54drives the CR motor 30 to move the carriage 28, and also drives thepaper feed motor 31 to feed the print paper P by a predetermined amount,thereby preparing for the next borderless printing (step S30).

Next, as shown in FIG. 9( d) and FIG. 9( e), the system controller 54makes the main-scan drive circuit 61 drive the CR motor 30 to move thecarriage 28 in order to eject ink from the print head 36 provided in thecarriage 28 and perform borderless printing (step S18); however, beforethis operation, the system controller 54 determines the ink-ejectionstart position and the ink-ejection end position of the print head 36(step S32 through step S50). The method of determining the ink-ejectionstart position and the ink-ejection end position will be describedfurther below.

Next, the procedure returns to step S16; the system controller 54 addsone (1) to the counter value N (step S16), and then, as shown in FIG. 9(d), FIG. 9( e), and FIG. 9( f), the above-described procedure from stepS18 to step S50 is carried out. During this procedure, the systemcontroller 54 controls the head drive circuit 63 to start ejection ofink from the ink-ejection start position that has been determined and toend ejection of ink at the ink-ejection end position that has beendetermined.

The procedure from this point onward is a repetition of from step S16 tostep S50, as shown by the loop structure in the flowchart of FIG. 10.

Next, an example of a method of determining the ink-ejection startposition and the ink-ejection end position is described using FIG. 11and with reference to FIG. 10. FIG. 11 is an explanatory diagram fordescribing a method of determining the ink-ejection start position andthe ink-ejection end position.

First, the system controller 54 determines whether the position of theedge of the print paper P was detected in step S20 and step S22. Forexample, the system controller 54 reads in the data from a storageregion corresponding to the N-th position A, and makes the determinationbased on the data that has been read in (step S32).

If the position of the edge of the print paper P has been detected (forexample, if the N-th position A has been stored), then the positionwhere ink ejection is to be started is determined based on this N-thposition A (which is indicated by a dotted-line circle in FIG. 11) (stepS36). For example, as shown in FIG. 11, the position where ink ejectionis to be started is determined, allowing for a margin with a distance αfrom the N-th position A (this position is indicated by a solid-linecircle in FIG. 11).

On the other hand, if the position of the edge of the print paper P wasnot detected (for example, if the N-th position A has not been stored)due, for example, to malfunction of the reflective optical sensor 29,then a position that has been established in advance independent of theN-th position A is adopted as the ink-ejection start position (thisposition is indicated by a square in FIG. 11) (step S38).

In the same way, the system controller 54 determines whether theposition of the edge of the print paper P was detected in step S26 andstep S28. For example, the system controller 54 reads in the data from astorage region corresponding to the N-th position B, and makes thedetermination based on the data that has been read in (step S44).

If the position of the edge of the print paper P has been detected (forexample, if the N-th position B has been stored), then the positionwhere ink ejection is to be ended is determined based on this N-thposition B (which is indicated by a dotted-line triangle in FIG. 11)(step S48). For example, as shown in FIG. 11, the position where inkejection is to be ended is determined, allowing for a margin with adistance α from the N-th position B (this position is indicated by asolid-line triangle in FIG. 11).

On the other hand, if the position of the edge of the print paper P wasnot detected (for example, if the N-th position B has not been stored)due, for example, to malfunction of the reflective optical sensor 29,then a position that has been established in advance independent of theN-th position B is adopted as the ink-ejection end position (thisposition is indicated by an X in FIG. 11) (step S50).

It should be noted that the margin α is set based, for example, on adetection error that occurs during detection of the edge of the printpaper P, such that no unnecessary blank space is created on the printpaper P. Further, in the above description, the value of the margin awas the same for when determining the start position and for whendetermining the end position. However, different values may be set.

Furthermore, it is preferable to set the start position and the endposition that are established in advance to include a sufficient margin,while taking into consideration the fact that no unnecessary blank spaceshould be created on the print paper P. For example, it is possible toadopt the start position and the end position of the print data, whichincludes a certain amount of margin with respect to the size of theprint paper as described in the section of the Background Art, as thestart position and the end position that are established in advance.

Furthermore, a program for carrying out the processes described above isstored in the EEPROM 58, and this program is executed by the systemcontroller 54.

As described in the section of the Background Art, in order to eliminatethe problem that ink is uselessly consumed by performing printing on aregion outside the print paper, it is advantageous to adopt a method ofdetecting the position of the edge of the print paper and changing thestart position and/or the end position for ejecting ink in accordancewith the detected edge position. However, in carrying out this method,situations may occur in which the position of the edge of the printpaper is not detected due to some reason. In such a situation, if thestart position and/or the end position for ejecting ink is determinedsimply by using information about the position of an edge that waspreviously detected, instead of information about the position of therelevant edge, without changing the way of determining the startposition and/or the end position for ejecting ink, then a problem that ablank space is unintentionally created on the print paper may arise.More specifically, the position of the edge that should have beendetected and the position of an edge that was previously detected maysignificantly differ due to the print paper being supplied in a slanted(skewed) manner, and therefore, the above-described problem may arise ifthe start position and/or the end position is determined simply by usinginformation about the position of an edge that was previously detectedwithout changing the way of determining the start position and/or theend position for ejecting ink.

In view of this, by setting the start position or the end position to aposition that has been established in advance in a case where the edgeposition was not detected as described above, it becomes possible toprevent a blank space from unintentionally being created on the printpaper.

Second Embodiment

Next, a second embodiment of the present invention is described usingFIG. 12 and with reference to FIG. 9. FIG. 12 is a flowchart fordescribing the second embodiment.

The present flowchart starts from the point where the user first givesan instruction to perform printing in the application program 95 etc.(step S102). The procedure from this point up to step S130 is the sameas that of from step S2 to step S30 described in the first embodiment.

In step S130, as shown in FIG. 9( c) and FIG. 9( d), the systemcontroller 54 drives the CR motor 30 to move the carriage 28, and alsodrives the paper feed motor 31 to feed the print paper P by apredetermined amount, thereby preparing for the next borderlessprinting. At this time, the system controller 54 obtains the amount ofmovement of the PF motor 31 from the reference position based on theoutput pulses of the rotary encoder 13, and stores this amount ofmovement, in other words, the amount by which the print paper P was fed(step S131).

Next, as shown in FIG. 9( d) and FIG. 9( e), the system controller 54makes the main-scan drive circuit 61 drive the CR motor 30 to move thecarriage 28 in order to eject ink from the print head 36 provided in thecarriage 28 and perform borderless printing (step S118); however, beforethis operation, the system controller 54 determines the ink-ejectionstart position and the ink-ejection end position of the print head 36(step S132 through step S154). The method of determining theink-ejection start position and the ink-ejection end position will bedescribed further below.

Next, the procedure returns to step S116; the system controller 54 addsone (1) to the counter value N (step S116), and then, as shown in FIG.9( d), FIG. 9( e), and FIG. 9( f), the above-described procedure fromstep S118 to step S154 is carried out. During this procedure, the systemcontroller 54 controls the head drive circuit 63 to start ejection ofink from the ink-ejection start position that has been determined and toend ejection of ink at the ink-ejection end position that has beendetermined.

The procedure from this point onward is a repetition of from step S116to step S154, as shown by the loop structure in the flowchart of FIG.12.

Next, an example of a method of determining the ink-ejection startposition and the ink-ejection end position is described with referenceto FIG. 11 and FIG. 12.

First, the system controller 54 determines whether the position of theedge of the print paper P was detected in step S120 and step S122. Forexample, the system controller 54 reads in the data from a storageregion corresponding to the N-th position A, and makes the determinationbased on the data that has been read in (step S132).

If the position of the edge of the print paper P has been detected (forexample, if the N-th position A has been stored), then the positionwhere ink ejection is to be started is determined based on this N-thposition A (which is indicated by a dotted-line circle in FIG. 11) (stepS136). For example, as shown in FIG. 11, the position where ink ejectionis to be started is determined, allowing for a margin with a distance αfrom the N-th position A (this position is indicated by a solid-linecircle in FIG. 11).

On the other hand, if the position of the edge of the print paper P wasnot detected (for example, if the N-th position A has not been stored)due, for example, to malfunction of the reflective optical sensor 29,then the position of the edge that was not detected is obtained frompositions of two edges that were detected in the past and an amount bywhich the print paper was fed from when the positions of the edges weredetected, and the position where ink ejection is to be started isdetermined based on the edge position that has been obtained.

This is described in more detail by giving an example. If the positionof the edge of the print paper P was not detected (if the N-th positionA was not stored in step S122), then first, the position of the edgethat was not detected is obtained from positions of two edges that weredetected in the past and an amount by which the print paper was fed fromwhen the positions of the edges were detected (step S140). For example,it is assumed that: the N−2-th position A and the N−1-th position A havebeen stored; the N−2-th position A, the N−1-th position A, and the N-thposition A that was not stored are expressed, respectively, as Xan−2,Xan−1, and Xan; and the N−3-th feed amount, the N−2-th feed amount, andthe N−1-th feed amount of print paper that were stored in step S131 areexpressed, respectively, as Pn−3, Pn−2, and Pn−1. Here, Xan, which isthe N-th position A that was not stored, is obtained from therelationship (Xan−Xan−1)/(Xan−Xan−2)=(Pn−1−Pn−2)/(Pn−1−Pn−3). That is,arranging this equation obtainsXan=((Pn−1−Pn−3)·Xan−1−(Pn−1−Pn−2)·Xan−2)/(Pn−2−Pn−3), and thus, it ispossible to obtain Xan from the known values Xan−2, Xan−1, Pn−3, Pn−2,and Pn−1.

Then, based on the N-th position A that has been obtained (which isindicated by the dotted-line circle in FIG. 11), the position where inkejection is to be started is determined (step S142). For example, asshown in FIG. 11, the position where ink ejection is to be started isdetermined, allowing for a margin with a distance α from the N-thposition A (this position is indicated by the solid-line circle in FIG.11).

In the same way, the system controller 54 determines whether theposition of the edge of the print paper P was detected in step S126 andstep S128. For example, the system controller 54 reads in the data froma storage region corresponding to the N-th position B, and makes thedetermination based on the data that has been read in (step S144).

If the position of the edge of the print paper P has been detected (forexample, if the N-th position B has been stored), then the positionwhere ink ejection is to be ended is determined based on this N-thposition B (which is indicated by a dotted-line triangle in FIG. 11)(step S148). For example, as shown in FIG. 11, the position where inkejection is to be ended is determined, allowing for a margin with adistance α from the N-th position B (this position is indicated by asolid-line triangle in FIG. 11).

On the other hand, if the position of the edge of the print paper P wasnot detected (for example, if the N-th position B has not been stored)due, for example, to malfunction of the reflective optical sensor 29,then the position of the edge that was not detected is obtained frompositions of two edges that were detected in the past and an amount bywhich the print paper was fed from when the positions of the edges weredetected, and the position where ink ejection is to be ended isdetermined based on the edge position that has been obtained.

This is described in more detail by giving an example. If the positionof the edge of the print paper P was not detected (if the N-th positionB was not stored in step S128), then first, the position of the edgethat was not detected is obtained from positions of two edges that weredetected in the past and an amount by which the print paper was fed fromwhen the positions of the edges were detected (step S152). For example,it is assumed that: the N−2-th position B and the N−1-th position B havebeen stored; the N−2-th position B, the N−1-th position B, and the N-thposition B that was not stored are expressed, respectively, as Xbn−2,Xbn−1, and Xbn; and the N−3-th feed amount, the N−2-th feed amount, andthe N−1-th feed amount of print paper that were stored in step S131 areexpressed, respectively, as Pn−3, Pn−2, and Pn−1. Here, Xbn, which isthe N-th position B that was not stored, is obtained from therelationship (Xbn−Xbn−1)/(Xbn−Xbn−2)=(Pn−1−Pn−2) /(Pn−1−Pn−3). That is,arranging this equation obtains Xbn=((Pn−1−Pn−3)Xbn−1−(Pn−1−Pn−2)·Xbn−2)−(Pn−2−Pn−3), and thus, it is possible to obtainXn from the known values Xbn−2, Xbn−1, Pn−3, Pn−2, and Pn−1.

Then, based on the N-th position B that has been obtained (which isindicated by the dotted-line triangle in FIG. 11), the position whereink ejection is to be ended is determined (step S142). For example, asshown in FIG. 11, the position where ink ejection is to be ended isdetermined, allowing for a margin with a distance α from the N-thposition B (this position is indicated by the solid-line triangle inFIG. 11).

Next, another example of a method of obtaining the ink-ejection startposition and the ink-ejection end position is described with referenceto FIG. 11 and FIG. 12.

In the previous description, if the position of the edge of the printpaper P was not detected (for example, if the N-th position A has notbeen stored) due, for example, to malfunction of the reflective opticalsensor 29, then the position of the edge that was not detected wasobtained from positions of two edges that were detected in the past andan amount by which the print paper was fed from when the positions ofthe edges were detected, and the position where ink ejection is to bestarted was determined based on the edge position that has beenobtained. In place of the above-described method, the position of theedge that was not detected is obtained from a position of a single edgethat was detected in the past, an amount by which the print paper wasfed from when the position of that edge was detected, and a predictedmaximum skew angle of the print paper, and the position where inkejection is to be started is determined based on the edge position thathas been obtained.

This is described in more detail by giving an example. If the positionof the edge of the print paper P was not detected (if the N-th positionA was not stored in step S122), then first, the position of the edgethat was not detected is instead obtained from a position of a singleedge that was detected in the past, an amount by which the print paperwas fed from when the position of that edge was detected, and apredicted maximum skew angle of the print paper (step S140). Forexample, it is assumed that: the N−1-th position A has been stored; theN−1-th position A and the N-th position A that was not stored areexpressed, respectively, as Xan−1 and Xan; the N−2-th feed amount andthe N−1-th feed amount of print paper that were stored in step S131 areexpressed, respectively, as Pn−2 and Pn−1; and the predicted maximumskew angle of the print paper is θ. Here, Xan, which is the N-thposition A that was not stored, is obtained from the relationship(Xan−Xan−1)/(Pn−1−Pn−2)=tan θ. That is, arranging this equation obtainsXan=Xan−1+(Pn−1−Pn−2)·tan θ, and thus, it is possible to obtain Xan fromthe known values Xan−1, Pn−2, Pn−1, and θ.

Then, based on the N-th position A that has been obtained (which isindicated by the dotted-line circle in FIG. 11), the position where inkejection is to be started is determined (step S142). For example, asshown in FIG. 11, the position where ink ejection is to be started isdetermined, allowing for a margin with a distance α from the N-thposition A (this position is indicated by the solid-line circle in FIG.11).

Similarly, in the previous description, if the position of the edge ofthe print paper P was not detected (for example, if the N-th position Bhas not been stored) due, for example, to malfunction of the reflectiveoptical sensor 29, then the position of the edge that was not detectedwas obtained from positions of two edges that were detected in the pastand an amount by which the print paper was fed from when the positionsof the edges were detected, and the position where ink ejection is to beended was determined based on the edge position that has been obtained.In place of the above-described method, the position of the edge thatwas not detected is obtained from a position of a single edge that wasdetected in the past, an amount by which the print paper was fed fromwhen the position of that edge was detected, and a predicted maximumskew angle of the print paper, and the position where ink ejection is tobe ended is determined based on the edge position that has beenobtained.

This is described in more detail by giving an example. If the positionof the edge of the print paper P was not detected (if the N-th positionB was not stored in step S128), then first, the position of the edgethat was not detected is instead obtained from a position of a singleedge that was detected in the past, an amount by which the print paperwas fed from when the position of that edge was detected, and apredicted maximum skew angle of the print paper (step S152). Forexample, it is assumed that: the N−1-th position B has been stored; theN−1-th position B and the N-th position B that was not stored areexpressed, respectively, as Xbn−1 and Xbn; the N−2-th feed amount andthe N−1-th feed amount of print paper that were stored in step S131 areexpressed, respectively, as Pn−2 and Pn−1; and the predicted maximumskew angle of the print paper is θ. Here, Xbn, which is the N-thposition B that was not stored, is obtained from the relationship(Xbn−Xbn−1)/(Pn−1−Pn−2)=tan θ. That is, arranging this equation obtainsXbn=Xbn−1+(Pn−1−Pn−2) tan θ, and thus, it is possible to obtain Xbn fromthe known values Xbn−1, Pn−2, Pn−1, and θ.

Then, based on the N-th position B that has been obtained (which isindicated by the dotted-line triangle in FIG. 11), the position whereink ejection is to be ended is determined (step S154). For example, asshown in FIG. 11, the position where ink ejection is to be ended isdetermined, allowing for a margin with a distance α from the N-thposition B (this position is indicated by the solid-line triangle inFIG. 11).

It should be noted that in the above description, the margin α is setbased, for example, on a detection error that occurs during detection ofthe edge of the print paper P, such that no unnecessary blank space iscreated on the print paper P. Further, in the above description, thevalue of the margin α was the same for when determining the startposition and for when determining the end position. However, differentvalues may be set.

Further, in the above description, the N−1-th position A or B and theN−2-th position A or B in the former method, and the N−1-th position Aor B in the latter method, were used for obtaining the N-th position Aor B. The positions, however, are not limited to the above, as long asthey are positions A or B that have been detected in the past.

Further, in the above description, since two positions A or B that weredetected in the past in the former method, and one position A or B thatwas detected in the past in the latter method, are used for obtainingthe N-th position A or B, it is instead possible to adopted a positionthat has been established in advance as the ink-ejection start position(which is indicated by a square in FIG. 11) and/or the end position(which is indicated by an X in FIG. 11), as described in the section ofthe first embodiment, while information regarding these positions in thepast has not yet been obtained sufficiently (step S134, step S135, stepS138, step S146, step S147, and step S150). Furthermore, it ispreferable to set the start position and the end position that areestablished in advance to include a sufficient margin, while taking intoconsideration the fact that no unnecessary blank space should be createdon the print paper P. For example, it is possible to adopt the startposition and the end position of the print data, which includes acertain amount of margin with respect to the size of the print paper asdescribed in the section of the Background Art, as the start positionand the end position that are established in advance.

Further, the maximum skew angle of the print paper described above maybe set by predicting the maximum angle at which the print paper may skewbased on, for example, information regarding the structure, mechanisms,etc. of the printing apparatus.

Furthermore, a program for carrying out the processes described above isstored in the EEPROM 58, and this program is executed by the systemcontroller 54.

As described in the section of the Background Art, in order to eliminatethe problem that ink is uselessly consumed by performing printing on aregion outside the print paper, it is advantageous to adopt a method ofdetecting the position of the edge of the print paper and changing thestart position and/or the end position for ejecting ink in accordancewith the detected edge position. However, in carrying out this method,situations may occur in which the position of the edge of the printpaper is not detected due to some reason. In such a situation, if thestart position and/or the end position for ejecting ink is determinedsimply by using information about the position of an edge that waspreviously detected, instead of information about the position of therelevant edge, without changing the way of determining the startposition and/or the end position for ejecting ink, then a problem that ablank space is unintentionally created on the print paper may arise.More specifically, the position of the edge that should have beendetected and the position of an edge that was previously detected maysignificantly differ due to the print paper being supplied in a slanted(skewed) manner, and therefore, the above-described problem may arise ifthe start position and/or the end position is determined simply by usinginformation about the position of an edge that was previously detectedwithout changing the way of determining the start position and/or theend position for ejecting ink.

In view of this, by determining the start position or the end positionbased on a position of an end that was detected in the past according tosuch a method as described above in a case where the edge position wasnot detected, it becomes possible to prevent a blank space fromunintentionally being created on the print paper.

It should be noted that in the foregoing embodiment, a method ofdetermining the start position or the end position based on a pluralityof positions of the edge that were detected in the past in a case wherethe position of the edge of the print paper was not detected wasdescribed as the former method. Further, a method of determining thestart position or the end position based on a single position of theedge that was detected in the past and a predicted maximum skew angle ofthe print paper in a case where the position of the edge of the printpaper was not detected was described as the latter method. These,however, are not limitations.

The foregoing embodiment, however, is more preferable because in theformer method, it is possible to determine an appropriate start positionor end position more accurately, and because in the latter method, it ispossible to determine the start position or the end position fromminimum information regarding the position of the edge that was detectedin the past.

Further, as regards the former method, in the foregoing embodiment, theposition of the edge that was not detected was obtained from theplurality of positions of the edge that were detected in the past, andthe start position or the end position was determined based on theposition of the edge that has been obtained, in a case where theposition of the edge was not detected. This, however, is not alimitation. For example, the start position or the end position may bedetermined directly from the plurality of positions of the edge thatwere detected in the past, without obtaining the position of the edgethat was not detected.

The foregoing embodiment, however, is more preferable because in thisway, it is possible to determine the start position or the end positionmore easily.

Further, as regards the former method, in the foregoing embodiment, theposition of the edge that was not detected was obtained from twopositions of the edge that were detected in the past, and the startposition or the end position was determined based on the position of theedge that has been obtained, in a case where the position of the edgewas not detected. This, however, is not a limitation. For example, theposition of the edge that was not detected may be obtained from three ormore positions of the edge that were detected in the past.

The foregoing embodiment, however, is more preferable because in thisway, it is possible to determine the start position or the end positionfrom minimum information regarding the positions of the edge that weredetected in the past.

Further, as regards the former method, in the foregoing embodiment, theposition of the edge that was not detected was obtained from theplurality of positions of the edge that were detected in the past and afeed amount by which the print paper was fed from when the positions ofthe edge were detected, and the start position or the end position wasdetermined based on the position of the edge that has been obtained, ina case where the position of the edge was not detected. This, however,is not a limitation.

The foregoing embodiment, however, is more preferable because, by usinginformation about the feed amount of the print paper to obtain theposition of the edge that was not detected, it is possible to determinean appropriate start position or end position more accurately.

Further, as regards the latter method, in the foregoing embodiment, theposition of the edge that was not detected was obtained from the singleposition of the edge that was detected in the past and the predictedmaximum skew angle of the print paper, and the start position or the endposition was determined based on the position of the edge that has beenobtained, in a case where the position of the edge was not detected.This, however, is not a limitation. For example, the start position orthe end position may be determined directly from the single position ofthe edge that was detected in the past and the predicted maximum skewangle of the print paper, without obtaining the position of the edgethat was not detected.

The foregoing embodiment, however, is more preferable because in thisway, it is possible to determine the start position or the end positionmore easily.

Further, as regards the latter method, in the foregoing embodiment, theposition of the edge that was not detected was obtained from the singleposition of the edge that was detected in the past, a feed amount bywhich the print paper was fed from when the position of the edge wasdetected, and the predicted maximum skew angle of the print paper, andthe start position or the end position was determined based on theposition of the edge that has been obtained, in a case where theposition of the edge was not detected. This, however, is not alimitation.

The foregoing embodiment, however, is more preferable because, by usinginformation about the feed amount of the print paper to obtain theposition of the edge that was not detected, it is possible to determinean appropriate start position or end position more accurately.

Third Embodiment

Next, a third embodiment of the present invention is described usingFIG. 13 and with reference to FIG. 9. FIG. 13 is a flowchart fordescribing the third embodiment.

The present flowchart starts from the point where the user first givesan instruction to perform printing in the application program 95 etc.(step S202). The procedure from this point up to step S230 is the sameas that of from step S2 to step S30 described in the first embodiment.

In step S230, as shown in FIG. 9( c) and FIG. 9( d), the systemcontroller 54 drives the CR motor 30 to move the carriage 28, and alsodrives the paper feed motor 31 to feed the print paper P by apredetermined amount, thereby preparing for the next borderlessprinting. Then, as shown in FIG. 9( d) and FIG. 9( e), the systemcontroller 54 makes the main-scan drive circuit 61 drive the CR motor 30to move the carriage 28 in order to eject ink from the print head 36provided in the carriage 28 and perform borderless printing (step S218);however, before this operation, the system controller 54 determines theink-ejection start position and the ink-ejection end position of theprint head 36 (step S232 through step S250). The method of determiningthe ink-ejection start position and the ink-ejection end position willbe described further below.

Next, the procedure returns to step S216; the system controller 54 addsone (1) to the counter value N (step S216), and then, as shown in FIG.9( d), FIG. 9( e), and FIG. 9( f), the above-described procedure fromstep S218 to step S250 is carried out. During this procedure, the systemcontroller 54 controls the head drive circuit 63 to start ejection ofink from the ink-ejection start position that has been determined and toend ejection of ink at the ink-ejection end position that has beendetermined.

The procedure from this point onward is a repetition of from step S216to step S250, as shown by the loop structure in the flowchart of FIG.13.

Next, an example of a method of determining the ink-ejection startposition and the ink-ejection end position is described with referenceto FIG. 11 and FIG. 13.

First, the system controller 54 determines whether the position of theedge of the print paper P was detected in step S220 and step S222. Forexample, the system controller 54 reads in the data from a storageregion corresponding to the N-th position A, and makes the determinationbased on the data that has been read in (step S232).

If the position of the edge of the print paper P has been detected (forexample, if the N-th position A has been stored), then the positionwhere ink ejection is to be started is determined based on this N-thposition A (which is indicated by a dotted-line circle in FIG. 11) (stepS234). For example, as shown in FIG. 11, the position where ink ejectionis to be started is determined, allowing for a margin with a distance αfrom the N-th position A (this position is indicated by a solid-linecircle in FIG. 11).

Next, the system controller 54 determines whether the position of theedge of the print paper P was detected in step S226 and step S228. Forexample, the system controller 54 reads in the data from a storageregion corresponding to the N-th position B, and makes the determinationbased on the data that has been read in (step S236).

If the position of the edge of the print paper P has been detected (forexample, if the N-th position B has been stored), then the positionwhere ink ejection is to be ended is determined based on this N-thposition B (which is indicated by a dotted-line triangle in FIG. 11)(step S238). For example, as shown in FIG. 11, the position where inkejection is to be ended is determined, allowing for a margin with adistance α from the N-th position B (this position is indicated by asolid-line triangle in FIG. 11).

On the other hand, if the position of the edge of the print paper P wasnot detected (for example, if the N-th position B has not been stored)due, for example, to malfunction of the reflective optical sensor 29,then the position of the edge that was not detected is obtained from theN-th position A that has been detected and the width of the print paper,and the position where ink ejection is to be ended is determined basedon the edge position that has been obtained.

More specifically, if the position of the edge of the print paper P wasnot detected (if the N-th position B was not stored in step S228), thenfirst, the position of the edge that was not detected is obtained fromthe N-th position A that has been detected and the width of the printpaper (step S240). For example, the N-th position B is obtained byadding the width of the print paper to the N-th position A that has beendetected.

Then, based on the N-th position B that has been obtained (which isindicated by the dotted-line triangle in FIG. 11), the position whereink ejection is to be ended is determined (step S238). For example, asshown in FIG. 11, the position where ink ejection is to be ended isdetermined, allowing for a margin with a distance α from the N-thposition B (this position is indicated by the solid-line triangle inFIG. 11).

Further, if, in step S232, the position of the edge of the print paper Pwas not detected (for example, if the N-th position A has not beenstored) due, for example, to malfunction of the reflective opticalsensor 29, then the system controller 54 determines whether the positionof the edge of the print paper P was detected in step S226 and stepS228. For example, the system controller 54 reads in the data from astorage region corresponding to the N-th position B, and makes thedetermination based on the data that has been read in (step S242).

If the position of the edge of the print paper P has been detected (forexample, if the N-th position B has been stored), then the N-th positionA that was not detected is obtained from the N-th position B that hasbeen detected and the width of the print paper, and the position whereink ejection is to be started is determined based on the edge positionthat has been obtained.

More specifically, first, the N-th position A that was not detected isobtained from the N-th position B that has been detected and the widthof the print paper (step S244). For example, the N-th position A isobtained by subtracting the width of the print paper from the N-thposition B that has been detected.

Then, based on the N-th position A that has been obtained (which isindicated by the dotted-line circle in FIG. 11), the position where inkejection is to be started is determined (step S246). For example, asshown in FIG. 11, the position where ink ejection is to be started isdetermined, allowing for a margin with a distance α from the N-thposition A (this position is indicated by the solid-line circle in FIG.11).

Next, the position where ink ejection is to be ended is determined basedon the N-th position B that has been detected (which is indicated by adotted-line triangle in FIG. 11) (step S238). For example, as shown inFIG. 11, the position where ink ejection is to be ended is determined,allowing for a margin with a distance α from the N-th position B (thisposition is indicated by a solid-line triangle in FIG. 11).

On the other hand, if, in step S242, the position of the edge of theprint paper P was not detected (for example, if the N-th position B hasnot been stored) due, for example, to malfunction of the reflectiveoptical sensor 29, then a position that has been established in advanceindependent of the N-th position A is adopted as the ink-ejection startposition (this position is indicated by a square in FIG. 11) (stepS248). Similarly, a position that has been established in advanceindependent of the N-th position B is adopted as the ink-ejection endposition (this position is indicated by an X in FIG. 11) (step S250).

It should be noted that in the above description, the margin α is setbased, for example, on a detection error that occurs during detection ofthe edge of the print paper P, such that no unnecessary blank space iscreated on the print paper P. Further, in the above description, thevalue of the margin α was the same for when determining the startposition and for when determining the end position. However, differentvalues may be set.

Furthermore, it is preferable to set the above-described start positionand the end position that are established in advance to include asufficient margin, while taking into consideration the fact that nounnecessary blank space should be created on the print paper P. Forexample, it is possible to adopt the start position and the end positionof the print data, which includes a certain amount of margin withrespect to the size of the print paper as described in the section ofthe Background Art, as the start position and the end position that areestablished in advance.

Furthermore, in the above description, the N-th position B was obtainedby adding the width of the print paper to the N-th position A that wasdetected. It is, however, possible to obtain the N-th position B byadding a margin to the width and then adding this to the N-th position Athat was detected, taking into consideration situations in which theprint paper is supplied in a skewed manner. Further, it is possible tofind the skew of the print paper using some kind of means, and obtainthe amount of margin to be added to the width based on the skew that wasfound. The above is applicable for obtaining the N-th position A bysubtracting the width of the print paper from the N-th position B thatwas detected.

Furthermore, a program for carrying out the processes described above isstored in the EEPROM 58, and this program is executed by the systemcontroller 54.

As described in the section of the Background Art, in order to eliminatethe problem that ink is uselessly consumed by performing printing on aregion outside the print paper, it is advantageous to adopt a method ofdetecting the position of the edge of the print paper and changing thestart position and/or the end position for ejecting ink in accordancewith the detected edge position. However, in carrying out this method,situations may occur in which the position of the edge of the printpaper is not detected due to some reason. In such a situation, if thestart position and/or the end position for ejecting ink is determinedsimply by using information about the position of an edge that waspreviously detected, instead of information about the position of therelevant edge, without changing the way of determining the startposition and/or the end position for ejecting ink, then a problem that ablank space is unintentionally created on the print paper may arise.More specifically, the position of the edge that should have beendetected and the position of an edge that was previously detected maysignificantly differ due to the print paper being supplied in a slanted(skewed) manner, and therefore, the above-described problem may arise ifthe start position and/or the end position is determined simply by usinginformation about the position of an edge that was previously detectedwithout changing the way of determining the start position and/or theend position for ejecting ink.

In view of this, in a case where the position of one of the two edges ofthe print paper was not detected as described above, it becomes possibleto prevent a blank space from unintentionally being created on the printpaper by determining the start position or the end position based on theposition of the other edge, of among the positions of the two edges.

It should be noted that in the foregoing embodiment, the position of theone edge that was not detected was obtained from the position of theother edge, of among the positions of both edges, and the start positionor the end position was determined based on the position of the one edgethat has been obtained, in a case where the position of one edge, ofamong the positions of both edges, was not detected. This, however, isnot a limitation. For example, the start position or the end positionmay be determined directly from the position of the other edge of thepositions of both edges, without obtaining the position of the one edgethat was not detected.

The foregoing embodiment, however, is more preferable because in thisway, it is possible to determine the start position or the end positionmore easily.

Further, in the foregoing embodiment, the position of the one edge thatwas not detected was obtained from the position of the other edge, ofamong the positions of both edges, and a width of the print paper, andthe start position or the end position was determined based on theposition of the one edge that has been obtained, in a case where theposition of one edge, of among the positions of both edges, was notdetected. This, however, is not a limitation.

The foregoing embodiment, however, is more preferable because, by usinginformation about the width of the print paper to obtain the position ofthe one edge that was not detected, it is possible to determine anappropriate start position or end position more accurately.

Other Embodiments

In the foregoing, a liquid ejecting apparatus etc. according to theinvention was described based on embodiments thereof. However, theforegoing embodiments are for the purpose of elucidating the presentinvention and are not to be interpreted as limiting the presentinvention. The invention can of course be altered and improved withoutdeparting from the gist thereof and includes equivalents.

Print paper was described as an example of the medium, but it alsopossible to use, for example, film, cloth, or thin metal sheets as themedium.

In the foregoing embodiments, a printing apparatus was described as anexample of the liquid ejecting apparatus. However, this is not alimitation. For example, technology like that of the foregoingembodiments can also be adopted for color filter manufacturing devices,dyeing devices, fine processing devices, semiconductor manufacturingdevices, surface processing devices, three-dimensional shape formingmachines, liquid vaporizing devices, organic EL manufacturing devices(particularly macromolecular EL manufacturing devices), displaymanufacturing devices, film formation devices, and DNA chipmanufacturing devices. The above-described effects can be maintainedeven when the present technology is adopted in these fields because ofthe feature that liquid can be ejected toward a medium.

Further, in the foregoing embodiments, a color inkjet printer wasdescribed as an example of the printing apparatus; however, this is nota limitation. For example, the present invention can also be applied tomonochrome inkjet printers.

Further, in the foregoing embodiments, ink was used as an example of theliquid; however, this is not a limitation. For example, it is alsopossible to eject from the nozzles a liquid (including water) includingmetallic material, organic material (particularly macromolecularmaterial), magnetic material, conductive material, wiring material,film-formation material, machining liquid, and genetic solution.

Further, in the foregoing embodiments, printing was performed withrespect to the entire surface of the print paper, that is, so-calledborderless printing was carried out. This, however, is not a limitation.For example, the above-described means achieve advantageous effects evenwhen printing is performed not with respect to the entire surface of theprint paper P, but with respect to a wide area thereof.

However, the advantages of the above-described means become moresignificant when borderless printing is performed, because printing isperformed also onto the edges of the print paper.

Further, in the foregoing embodiments, the reflective optical sensorincluded a light-emitting section for emitting light, and alight-receiving section for receiving the light that moves in amain-scanning direction in accordance with the movement of thelight-emitting section in the main-scanning direction; and the positionof the edge was detected based on a change in an output value of thelight-receiving section caused by the light emitted from thelight-emitting section that moves in the main-scanning direction passingacross the edge. This, however, is not a limitation.

The foregoing embodiments, however, are more preferable because in thisway, it is possible to detect the position of the edge more easily.

Further, in the foregoing embodiments, positions of two edges thatdiffer in position in the main-scanning direction were detected based onthe change in the output value of the light-receiving section caused bythe light emitted from the light-emitting section that moves in themain-scanning direction passing across the edges; and the start positionwas changed in accordance with one of the positions of the two edgesthat were detected, and the end position was changed in accordance withthe other of the positions of the two edges that were detected. This,however, is not a limitation. For example, the position of a single edgemay be detected during the detection operation based on the change inthe output value of the light-receiving section caused by the lightemitted from the light-emitting section that moves in the main-scanningdirection passing across the edges, and the start position or the endposition may be changed in accordance with the position of the singleedge that was detected.

The foregoing embodiments, however, are more preferable because in thisway, the above-described effect, that is, the effect of being able toprevent a blank space from unintentionally being created on the printpaper, will be achieved more significantly.

Further, in the foregoing embodiments, the reflective optical sensor wasprovided on a movable carriage provided with the print head. This,however, is not a limitation. For example, the carriage and thereflective optical sensor may be configured to be movable separately.

The foregoing embodiments, however, are more preferable because in thisway, it is possible to share the mechanism for moving the carriage andthe reflective optical sensor.

Further, in the foregoing embodiments, while the carriage was moved inthe main-scanning direction, the position of the edge was detected basedon a change in an output value of the light-receiving section caused bythe light emitted from the light-emitting section that moves in themain-scanning direction passing across the edge of the print paper, andthe ink was ejected from the print head onto the print paper. This,however, is not a limitation. For example, the detection operation andthe ejection operation may be carried out separately.

The foregoing embodiments, however, are more preferable because in thisway, it is possible to achieve efficient operation.

Further, in the foregoing embodiments, description was made about a casein which the light emitted from the reflective optical sensor passedacross the edge of the print paper but the position of the edge of theprint paper P could not be detected due, for example, to malfunction ofthe reflective optical sensor 29. The foregoing embodiments, however,are applicable to cases in which the position of the edge of the printpaper P could not be detected due to the light emitted from thereflective optical sensor not passing across the edge of the printpaper, which may occur, for example, when the so-called logical seekmode is adopted.

===Configuration of Computer System Etc.===

Next, an embodiment of a computer system, which is an example of anembodiment of the present invention, will be described with reference tothe drawings.

FIG. 14 is an explanatory diagram showing the external configuration ofthe computer system. A computer system 1000 is provided with a maincomputer unit 1102, a display device 1104, a printer 1106, an inputdevice 1108, and a reading device 1110. In this embodiment, the maincomputer unit 1102 is accommodated within a mini-tower type housing;however, this is not a limitation. A CRT (cathode ray tube), a plasmadisplay, or a liquid crystal display device, for example, is generallyused as the display device 1104, but this is not a limitation. Theprinter 1106 is the printer described above. In this embodiment, theinput device 1108 is a keyboard 1108A and a mouse 1108B, but it is notlimited to these. In this embodiment, a flexible disk drive device 1110Aand a CD-ROM drive device 1110B are used as the reading device 1110, butthe reading device 1110 is not limited to these, and it may also be a MO(magneto optical) disk drive device or a DVD (digital versatile disk),for example.

FIG. 15 is a block diagram showing the configuration of the computersystem shown in FIG. 14. An internal memory 1202 such as a RAM withinthe housing accommodating the main computer unit 1102 and, also, anexternal memory such as a hard disk drive unit 1204 are provided.

It should be noted that in the above description, an example wasdescribed in which the computer system is constituted by connecting theprinter 1106 to the main computer unit 1102, the display device 1104,the input device 1108, and the reading device 1110. However, this is nota limitation. For example, the computer system can be made of the maincomputer unit 1102 and the printer 1106, or the computer system does nothave to be provided with one of the display device 1104, the inputdevice 1108, and the reading device 1110.

It is also possible for the printer 1106, for example, to have some ofthe functions or mechanisms of the main computer unit 1102, the displaydevice 1104, the input device 1108, and the reading device 1110. As anexample, the printer 1106 may be configured so as to have an imageprocessing section for carrying out image processing, a display sectionfor carrying out various types of displays, and a recording mediaattachment/detachment section to and from which recording media storingimage data captured by a digital camera or the like are inserted andtaken out.

As an overall system, the computer system that is achieved in this waybecomes superior to conventional systems.

INDUSTRIAL APPLICABILITY

According to the present invention, it becomes possible to achieve aliquid ejecting apparatus and a computer system with which no blankspace is created on a medium.

1. A liquid ejecting apparatus comprising: a movable ejection head thatejects a liquid; a feed mechanism that feeds a medium; and a detectingsection that detects a position of an edge of said medium; wherein saidliquid ejecting apparatus repeats an operation of detecting the positionof said edge with said detecting section an operation of feeding saidmedium with said feed mechanism, and an operation of ejecting the liquidonto said medium from said ejection head that is moving; wherein, inaccordance with the position of said edge that has been detected, saidliquid ejecting apparatus changes at least either one of a startposition and an end position for ejecting the liquid from said ejectionhead that is moving; and wherein, in case that the position of said edgewas not detected, said liquid ejecting apparatus sets said startposition or said end position to a position that has been established inadvance independent of the position of said edge that was detected inthe past.
 2. A liquid ejecting apparatus according to claim 1, whereinthe liquid is ejected with respect to an entire surface of said medium.3. A liquid ejecting apparatus according to claim 1, wherein saiddetecting section includes light-emitting means for emitting light, anda light-receiving sensor for receiving said light that moves in amain-scanning direction in accordance with the movement of saidlight-emitting means in said main-scanning direction; and wherein theposition of said edge is detected based on a change in an output valueof said light-receiving sensor caused by the light emitted from saidlight-emitting means that moves in said main-scanning direction passingacross said edge.
 4. A liquid ejecting apparatus according to claim 1,wherein said detecting section is provided on a movable moving memberprovided with said ejection head.
 5. A liquid ejecting apparatusaccording to claim 4, wherein, while said moving member is moved in amain-scanning direction, the position of said edge is detected based ona change in an output value of said light-receiving sensor caused by thelight emitted from said light-emitting means that moves in saidmain-scanning direction passing across said edge, and the liquid isejected from said ejection head onto said medium.
 6. A liquid ejectingapparatus according to claim 1, wherein said liquid is ink; and whereinsaid liquid ejecting apparatus is a printing apparatus that performsprinting on a medium to be printed, which serves as said medium, byejecting the ink from said ejection head.
 7. A liquid ejecting apparatuscomprising: a movable ejection head that ejects a liquid; a feedmechanism that feeds a medium; and a detecting section that detects aposition of an edge of said medium, wherein sad liquid ejectingapparatus repeats an operation of detecting the position of said edgewith said detecting section, an operation of feeding said medium withsaid feed mechanism, and an operation of e1ecting liquid onto saidmedium from said ejection head that is moving; wherein, in accordancewith the position of said edge that has been detected, said liquidejecting apparatus changes at least either one of a start position andan end position for ejecting the liquid from said eject ion head that ismoving; and wherein, in case that the position of said edge was notdetected, said liquid ejecting apparatus determines said start positionor said end position based on a single position of said edge that wasdetected in the past and a predicted maximum skew angle of said medium.8. A liquid ejecting apparatus according to claim 7, wherein, if theposition of said edge was not detected, said liquid ejecting apparatusobtains the position of said edge that was not detected from the singleposition of said edge that was detected in the past and said predictedmaximum skew angle of said medium, and determines said start position orsaid end position based on the position of said edge that has beenobtained.
 9. A liquid ejecting apparatus according to claim 8, wherein,if the position of said edge was not detected, said liquid ejectingapparatus obtains the position of said edge that was not detected fromthe single position of said edge that was detected in the past, a feedamount by which said medium was fed from when said position of said edgewas detected, and said predicted maximum skew angle of said medium, anddetermines said start position or said end position based on theposition of said edge that has been obtained.
 10. A liquid ejectingapparatus comprising: a movable ejection head for ejecting a liquid; afeed mechanism for feeding a medium; and detecting means for detecting aposition of an edge of said medium; wherein said liquid ejectingapparatus repeats an operation of detecting the position of said edgewith said detecting means, an operation of feeding said medium with saidfeed mechanism, and an operation of ejecting the liquid with respect toan entire surface of said medium from said ejection head that is moving;wherein, in accordance with the position of said edge that has beendetected, said liquid ejecting apparatus changes at least either one ofa start position and an end position for ejecting the liquid from saidejection head that is moving; wherein, if the position of said edge wasnot detected, said liquid ejecting apparatus obtains the position ofsaid edge that was not detected from a single position of said edge thatwas detected in the past, a feed amount by which said medium was fedfrom when said position of said edge was detected, and a predictedmaximum skew angle of said medium, and determines said start position orsaid end position based on the position of said edge that has beenobtained; wherein said detecting means includes light-emitting means foremitting light, and a light-receiving sensor for receiving said lightthat moves in a main-scanning direction in accordance with the movementof said light-emitting means in said main-scanning direction; whereinpositions of two edges that differ in position in said main-scanningdirection are detected based on a change in an output value of saidlight-receiving sensor caused by the light emitted from saidlight-emitting means that moves in said main-scanning direction passingacross said edges; wherein said start position is changed in accordancewith one of said positions of the two edges that were detected, and saidend position is changed in accordance with the other of said positionsof the two edges that were detected; wherein said detecting means isprovided on a movable moving member provided with said ejection head;wherein, while said moving member is moved in said main-scanningdirection, the position of said edge is detected based on the change inthe output value of said light-receiving sensor caused by the lightemitted from said light-emitting means that moves in said main-scanningdirection passing across said edge, and the liquid is ejected from saidejection head onto said medium; wherein said liquid is ink; and whereinsaid liquid ejecting apparatus is a printing apparatus that performsprinting on a medium to be printed, which serves as said medium, byejecting the ink from said ejection head.
 11. A computer systemcomprising: a main computer unit; a display device that is connectableto said main computer unit; and a liquid ejecting apparatus that isconnectable to said main computer unit and that is provided with: amovable ejection head that ejects a liquid; a feed mechanism that feedsa medium; and a detecting section that detects a position of an edge ofsaid medium, wherein said liquid ejecting apparatus repeats an operationof detecting the position of said edge with said detecting section, anoperation of feeding said medium with said feed mechanism, and anoperation of ejecting the liquid onto said medium from said ejectionhead that is moving; wherein, in accordance with the position of saidedge that has been detected, said liquid ejecting apparatus changes atleast either one of a start position and an end position for ejectingthe liquid from said ejection head that is moving; and wherein, in casethat the position of said edge was not detected, said liquid ejectingapparatus sets said start position or said end position to a positionthat has been established in advance independent of the position of saidedge that was detected in the past.
 12. A computer system comprising: amain computer unit; a display device that is connectable to said maincomputer unit; and a liquid ejecting apparatus that is connectable tosaid main computer unit and that is provided with: a movable ejectionhead that ejects a liquid; a feed mechanism that feeds a medium; and adetecting section that detects a position of an edge of said medium,wherein said liquid ejecting apparatus repeats an operation of detectingthe position of said edge with said detecting section, an operation offeeding said medium with said feed mechanism, and an operation ofejecting the liquid onto said medium from said ejection head that ismoving; wherein, in accordance with the position of said edge that hasbeen detected, said liquid ejecting apparatus changes at least eitherone of a start position and an end position for ejecting the liquid fromsaid ejection head that is moving; and wherein, in case that theposition of said edge was not detected, said liquid ejecting apparatusdetermines said start position or said end position based on a singleposition of said edge that was detected in the past and a predictedmaximum skew angle of said medium.
 13. A liquid ejection method ofejecting a liquid onto a medium, comprising: detecting a position of anedge of the medium with a sensor; feeding the medium; and changing, inaccordance with the position of said edge that has been detected, atleast either one of a start position and an end position for ejectingthe liquid from an ejection head that is moving, wherein, in case thatthe position of said edge was not detected, said start position or saidend position is set to a position that has been established in advanceindependent of the position of said edge that was detected in the past.14. A liquid ejection method of ejecting a liquid onto a medium,comprising: detecting a position of an edge of the medium with a sensor;feeding the medium; and changing, in accordance with the position ofsaid edge that has been detected, at least either one of a startposition and an end position for ejecting the liquid from an ejectionhead that is moving, wherein, in case that the position of said edge wasnot detected, said start position or said end position is determinedbased on a single position of said edge that was detected in the pastand a predicted maximum skew angle of said medium.